package com.cms.recursoshumanos.handler;

import com.cms.recursoshumanos.cache.UserInfoCache;
import com.cms.recursoshumanos.facade.ListaFamiliarScreenFacade;

public class ListaFamiliarScreenHandler extends BaseHandler

{
	public ListaFamiliarScreenHandler()
	{
		
	}
	public void facadeListaFamiliarScreen(String username, String password, int decision)
	{
		ListaFamiliarScreenFacade lista_familiar_facade = new ListaFamiliarScreenFacade(username,
																							password,
																							decision);
		lista_familiar_facade.getListaFamiliar();
	}
	public void refreshListaFamiliar (String username, String password, int decision)
	{
		this.facadeListaFamiliarScreen(username, password, decision);
	}
	public void getListaFamiliar (String username, String password, int decision)
	{
		// si decision es ------->   1: Viene de la Ventana ListaFamiliarScreen
		//							 2: Viene de la Ventana ListaBeneficiarioScreen
		//							 3: Viene de la Ventana Solicitud de Carta Aval
		if ( (!(UserInfoCache.getInstance().cache_utilizable(2)))
				|| UserInfoCache.getInstance().lista_vacia(2))
		{
			this.facadeListaFamiliarScreen(username, password, decision);
		}
		else
		{
			goListaFamiliar();
		}
			
	}

}

